<jsp:include page="logincheck.jsp" />
<%@ page import="java.util.*" %>

<jsp:useBean id="phoneAccount" class="se2.PhoneAccount" scope="request"/>
<jsp:setProperty name="phoneAccount" property="*"/>

<%
	String action = request.getParameter("action");
	
	phoneAccount.getPhoneAccountFromDatabase();
	
	if (action.equals("suspend") && phoneAccount.suspendPhoneAccount())
	{
		String url = "viewCustomerAccountDetails.jsp?id=" + phoneAccount.getCustomerId();
%>
		<jsp:forward page="<%= url %>" />
<%
	}
	else if (action.equals("unsuspend") && phoneAccount.unsuspendPhoneAccount())
	{
		String url = "viewCustomerAccountDetails.jsp?id=" + phoneAccount.getCustomerId();
%>
		<jsp:forward page="<%= url %>" />
<%
	}
%>